<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
  <a class="navbar-brand" href="{{ url_for('main.index') }}">ApiAutomationTest</a>
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent">
    <span class="navbar-toggler-icon"></span>
  </button>
  <div class="collapse navbar-collapse" id="navbarSupportedContent">
    <ul class="navbar-nav mr-auto">
      <li class="nav-item">
        <a class="nav-link" href="{{ url_for('project.project') }}">项目</a>
      </li>
{#      <li class="nav-item">#}
{#        <a class="nav-link" href="{{ url_for('case.case', id='1') }}">请求</a>#}
{#      </li>#}
      <li class="nav-item dropdown">
        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown">
          报告
        </a>
        <div class="dropdown-menu dropdown-menu-lg-left" style="min-width: 10vw;">
          <span class="dropdown-item-text latest-report-dropdown-item-text pl-1" >
{#            <img src="/static/icon/bootstrap-icons/clock-history.svg" alt=" "/>#}
            <i class="fas fa-history"></i>
            最近的报告
            <a class="btn btn-refresh float-right mt-1" id="btn-refresh-latest-report"></a>
          </span>
          {% include '_navbar_latest_reports.html' %}
          <div class="dropdown-divider"></div>
{#          <a class="dropdown-item" href="#" style="padding-left: 0rem">#}
{#            <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-list" fill="currentColor" xmlns="http://www.w3.org/2000/svg">#}
{#              <path fill-rule="evenodd" d="M2.5 11.5A.5.5 0 0 1 3 11h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4A.5.5 0 0 1 3 3h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z"/>#}
{#            </svg>#}
{#            显示全部#}
{#          </a>#}
          <a class="dropdown-item pl-1" href="{{ url_for('report.report') }}">
{#            <img src="/static/icon/bootstrap-icons/list.svg" alt=" "/>#}
            <i class="fa fa-list-ul"></i>
            显示全部
          </a>
{#          <a class="dropdown-item" href="#" style="padding-left: 0rem"><object data="/static/icon/bootstrap-icons/list.svg" type="image/svg+xml"></object>显示全部</a>#}
{#          <a class="dropdown-item" href="#" style="padding-left: 0rem"><embed src="/static/icon/bootstrap-icons/list.svg" type="image/svg+xml" />显示全部</a>#}
        </div>
      </li>
      <li class="nav-item dropdown">
        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown">
        设置
        </a>
        <div class="dropdown-menu">
          <a class="dropdown-item" href="{{ url_for('setting.basic_setting') }}">基本设置</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="#">关于</a>
        </div>
      </li>
    </ul>
    <div class="btn-toolbar" role="toolbar">
      {% if not current_user.is_authenticated %}
      <div class="btn-group mr-2" role="group">
        <form action="{{ url_for('auth.login') }}">
          <button class="btn btn-outline-primary" type="submit">登录</button>
        </form>
      </div>
      <div class="btn-group mr-2" role="group">
        <form action="{{ url_for('auth.email_authentication') }}">
          <button class="btn btn-outline-success" type="submit">注册</button>
        </form>
      </div>
      {% else %}
      <div class="btn-group" role="group">
        <form action="{{ url_for('auth.logout') }}">
          <span class="mr-2 d-none d-lg-inline text-secondary small">{{ current_user.username }}(id:{{ current_user.id }})</span>
          <button class="btn btn-outline-secondary" type="submit">退出</button>
        </form>
      </div>
      {% endif %}
    </div>
  </div>
</nav>